home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-17 / lmousent.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-04-01  |  2KB  |  76 lines

  1. @echo off
  2.  
  3. REM Give help if needed
  4. if "%1" == "/?" goto LHelp
  5. if "%1" == "-?" goto LHelp
  6. if "%1" == "-help" goto LHelp
  7. if "%1" == "-HELP" goto LHelp
  8. if "%1" == "/help" goto LHelp
  9. if "%1" == "/HELP" goto LHelp
  10.  
  11. REM Check that we are running under NT
  12. if "%WinDir%" == "" goto ENotNT
  13. if "%username%" == "" goto ENotNT
  14.  
  15. REM Hello mesage
  16. echo Logitech mouse driver installation.
  17. echo This batch file installs a Windows NT serial mouse driver.
  18. echo To get help, type: INSTALL /help
  19. echo Press Ctrl-C to stop or ...
  20. pause
  21.  
  22. REM Start the installation
  23. echo Start installation
  24.  
  25. set _DRVINI=install.ini
  26. if not exist regmod.exe goto ENoReg
  27. if not exist %_DRVINI% goto ENoINI
  28.  
  29. REM Check and set the environment
  30. set _DRIVER=Sermouse.sys
  31. set _DRVBAK=Sermouse.bak
  32. set _DRVDIR=%WinDir%\system32\drivers
  33. if not %_DRVDIR% == %WinDir%\system32\drivers goto ENoEnv
  34. if not exist copydrv.bat goto ENoCopy
  35. call copydrv.bat
  36.  
  37. REM Update the registry
  38. echo Updating the registry
  39. regmod %_DRVINI% > NUL
  40. echo Registry updated
  41.  
  42. REM Cleanup
  43. set _DRIVER=
  44. set _DRVINI=
  45. set _DRVBAK=
  46. set _DRVDIR=
  47.  
  48. REM Goodbye
  49. echo Installation completed.
  50. goto End
  51.  
  52. :ENoCopy
  53. echo ERROR: Cannot find CopyDrv.bat file.
  54. goto End
  55.  
  56. :ENoEnv
  57. echo ERROR: Not enough environment space.
  58. goto End
  59.  
  60. :ENotNT
  61. echo ERROR: This batch file must be run under Windows NT
  62. goto End
  63.  
  64. :ENoReg
  65. echo ERROR: Cannot access the RegMod.exe file.
  66. goto End
  67.  
  68. :ENoINI
  69. echo ERROR: Cannot find the %_DRVINI% file.
  70. goto End
  71.  
  72. :LHelp
  73. type readme.txt | more
  74.  
  75. :End
  76.